#ifndef MAGICCUBE_RENDERWIDGET_H
#define MAGICCUBE_RENDERWIDGET_H

#include <QGLWidget>
#include <memory>
namespace GCL {
class Scene;
class RenderWidget : public QGLWidget
{
    Q_OBJECT
public:
    explicit RenderWidget(GCL::Scene *scene,  QWidget *parent = 0);
    ~RenderWidget();


protected:
public:
    void initializeGL();
    void resizeGL(int w, int h);
    void paintGL();

    void mousePressEvent(QMouseEvent *e);
    void mouseReleaseEvent(QMouseEvent *e);
    void mouseMoveEvent(QMouseEvent *e);
    void wheelEvent(QWheelEvent *e);
    void timerEvent(QTimerEvent *);

    void keyReleaseEvent(QKeyEvent* e);

signals:

public slots:
     void cubeRefresh();
private:
    GCL::Scene*  scene_;
    //void test();
};
}
#endif // RENDERWIDGET_H
